package server.datamodel;

public class TowerDescription {

	private String ID;
	private TowerTypeToTowerMapping towerTypeToTowerMapping;
	private String description;
	private String name;
	private int price;
	private int coolDownMax;
	private int damage;
	private double range;
	private int sellTime;
	private int sellValue;
	private double slowRate;
	private int slowTime;
	private double splashRadius;
	private double splashDamageReduce;
	private boolean upgradeable;
	private int upgradeTime;
	private int level;
	private String type;
	private String color;
	
	public TowerDescription() {
		this.ID = Datamodel.generateID(this);
	}
	
	@Override
	public String toString() {
		return ID;
	}
	
	public void setTowerTypeToTowerMapping(TowerTypeToTowerMapping towerTypeToTowerMapping) {
		if(this.towerTypeToTowerMapping != towerTypeToTowerMapping) {
			if(getTowerTypeToTowerMapping() != null) {
				getTowerTypeToTowerMapping().removeTowerDiscription(this);
			}
			this.towerTypeToTowerMapping = towerTypeToTowerMapping;
			if(getTowerTypeToTowerMapping() != null) {
				getTowerTypeToTowerMapping().addTowerDescription(this);
			}
		}
	}
	
	public TowerTypeToTowerMapping getTowerTypeToTowerMapping() {
		return towerTypeToTowerMapping;
	}

	public String getID() {
		return ID;
	}

	public void setID(String iD) {
		ID = iD;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public int getCoolDownMax() {
		return coolDownMax;
	}

	public void setCoolDownMax(int coolDownMax) {
		this.coolDownMax = coolDownMax;
	}

	public int getDamage() {
		return damage;
	}

	public void setDamage(int damage) {
		this.damage = damage;
	}

	public double getRange() {
		return range;
	}

	public void setRange(double range) {
		this.range = range;
	}

	public int getSellTime() {
		return sellTime;
	}

	public void setSellTime(int sellTime) {
		this.sellTime = sellTime;
	}

	public int getSellValue() {
		return sellValue;
	}

	public void setSellValue(int sellValue) {
		this.sellValue = sellValue;
	}

	public double getSlowRate() {
		return slowRate;
	}

	public void setSlowRate(double slowRate) {
		this.slowRate = slowRate;
	}

	public int getSlowTime() {
		return slowTime;
	}

	public void setSlowTime(int slowTime) {
		this.slowTime = slowTime;
	}

	public boolean isUpgradeable() {
		return upgradeable;
	}

	public void setUpgradeable(boolean upgradeable) {
		this.upgradeable = upgradeable;
	}

	public int getUpgradeTime() {
		return upgradeTime;
	}

	public void setUpgradeTime(int upgradeTime) {
		this.upgradeTime = upgradeTime;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setSplashDamageReduce(double splashDamageReduce) {
		this.splashDamageReduce = splashDamageReduce;
	}
	
	public void setSplashRadius(double splashRadius) {
		this.splashRadius = splashRadius;
	}
	
	public double getSplashRadius() {
		return splashRadius;
	}
	
	public double getSplashDamageReduce() {
		return splashDamageReduce;
	}
}
